package com.matt.controller.web;

import com.matt.domain.teaching.TeachingMaterial;
import com.matt.commons.model.StatusResponse;
import com.matt.commons.page.PagerQuery;
import com.matt.service.TeachingMaterialService;

import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/11
 * *******************************
 */
@RestController
@RequestMapping("/web/teaching_material")
public class WebTeachingMaterialController {

    @Autowired
    private TeachingMaterialService materialService;

    @ApiOperation(value = "资料详情",httpMethod = "POST")
    @RequestMapping("/detail")
    public StatusResponse detail(@RequestHeader String ticket, Long id) {
        TeachingMaterial material = materialService.getByMaterialId(id);
        return StatusResponse.success(material);
    }
}
